package com.sngamelib.topdownshooter;

import java.util.Date;

public class RepairModule implements Cycleable
{
	private int repairAmount;
	private AspectType repairAspect;
	private CycleTimer cycTimer;
	
	RepairModule()
	{
		repairAmount = 0;
		repairAspect = null;
		cycTimer = new CycleTimer();
	}
	
	RepairModule(int _ra, AspectType _rAs)
	{
		repairAmount = _ra;
		repairAspect = _rAs;
		cycTimer = new CycleTimer();
	}
	
	RepairModule(int _ra, AspectType _rAs, int _d, int _c)
	{
		repairAmount = _ra;
		repairAspect = _rAs;
		cycTimer = new CycleTimer(_d, _c);
	}
	
	RepairModule(RepairModule _rm)
	{
		repairAmount = _rm.getRepairAmount();
		repairAspect = _rm.getRepairAspect();
		cycTimer = _rm.getCycTimer();
	}
	
	public CycleTimer getCycTimer()
	{
		return cycTimer;
	}
	
	public int getRepairAmount()
	{
		return repairAmount;
	}
	
	public AspectType getRepairAspect()
	{
		return repairAspect;
	}
	
	public int getDuration()
	{
		return cycTimer.getDuration();
	}
	
	public int getCounter()
	{
		return cycTimer.getCounter();
	}
	
	public Date getStartTime()
	{
		return cycTimer.getStartTime();
	}
	
	public Date getTimeRemainingDate()
	{
		return cycTimer.getTimeRemainingDate();
	}
	
	public long getTimeRemainingLong()
	{
		return cycTimer.getTimeRemainingLong();
	}
	
	public int getTimeRemainingInt()
	{
		return cycTimer.getTimeRemainingInt();
	}
	
	public void setDuration(int _d)
	{
		cycTimer.setDuration(_d);
	}
	
	public void setCounter(int _c)
	{
		cycTimer.setCounter(_c);
	}
	
	public void setStartTime(Date _st)
	{
		cycTimer.setStartTime(_st);
	}
	
	public boolean doRepair()
	{
		//do repair stuff here maybe?
		return true; //or return false if it didnt work etc etc etc.
	}
	
	@Override
	public void cycleWork()
	{
		// TODO Auto-generated method stub

	}

}
